﻿using System;
using Microsoft.Crm.Sdk;
using Microsoft.Crm.SdkTypeProxy;

namespace [ProjectNameHere].Plugins
{
    public class OpportunityPreCreatePlugin : IPlugin
    {
        public void Execute(IPluginExecutionContext context)
        {
            if (context.InputParameters.Properties.Contains(ParameterName.Target) &&
                context.InputParameters.Properties[ParameterName.Target] is DynamicEntity)
            {
                DynamicEntity opportunity_entity = (DynamicEntity)context.InputParameters[ParameterName.Target];

                if (opportunity_entity.Name != EntityName.opportunity.ToString())
                    return;

            }
        }
    }
}
